package design_mode.decorator;

public class Client {
    public static void main(String[] args) {
        ITransportation myCar = new Car();
        myCar.move();
        System.out.println("============================");

        System.out.println("===========陆空两用车=============");
        FlyingCar flyingCar = new FlyingCar(myCar);
        flyingCar.move();
        flyingCar.flying();

        System.out.println("=============水陆两用车======================");
        AmphibiousCar amphibiousCar = new AmphibiousCar(myCar);
        amphibiousCar.move();
        amphibiousCar.moveInWater();
    }
}
